import request from '@/utils/request'

// 查询用户详情-消费记录-新增列表
export function listRecord(query) {
  return request({
    url: '/passenger/record/list',
    method: 'get',
    params: query
  })
}

// 查询用户详情-消费记录-新增详细
export function getRecord(consumptionId) {
  return request({
    url: '/passenger/record/' + consumptionId,
    method: 'get'
  })
}

// 新增用户详情-消费记录-新增
export function addRecord(data) {
  return request({
    url: '/passenger/record',
    method: 'post',
    data: data
  })
}

// 修改用户详情-消费记录-新增
export function updateRecord(data) {
  return request({
    url: '/passenger/record',
    method: 'put',
    data: data
  })
}

// 删除用户详情-消费记录-新增
export function delRecord(consumptionId) {
  return request({
    url: '/passenger/record/' + consumptionId,
    method: 'delete'
  })
}
